package com.lz.hrmanager.controller;

import com.lz.hrmanager.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/list")
    public String showUser(ModelMap modelMap){

        modelMap.addAttribute("users",userService.getAll());

        return "user/userlist";
    }

    /**
     * 插入新用户
     */
    @RequestMapping("/insert")
    public void insertUser(){

    }

    /**
     * 编辑
     */
    @RequestMapping("/edit")
    public void updateUser(){

    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public void deleteUser(){

    }
}
